MacGzip is Jean-loup Gailly's gzip compressor (GNU zip) for the Macintosh, ported to Mac by SPDsoft and ported again for PowerMac by Erling Johansen <ejo@vingmed.no>
Requires system 7 and it should work in any Macintosh if you have the correct combination of soft and CPU (if you want to know which version of MacGzip you have, choose 'get info' from the finder; 68K and FAT run on any Macintosh (FAT runs native for Power Macs); and the version for Power Mac only runs on Power Macs (you will get a -192 error if you try to open it on a 68K Mac))
MacGzip can compress and decompress files; but as gzip is an UNIX compressor, if you gzip a Macintosh file, you will lose the resource fork (MacGzip will warn you before). Many text editors save things like font and size in the resource fork; custom icons are in the resource fork too; so for text and image files, you can discard the resource fork. If you want to retain all the information of any Mac file, you must use a MacBinary translator first. (Version 1.0 will do the translation; if some day I can find time enaugh to make it)
You should read the files in 'GNU docs' folder…
• Configuring MacGzip
The easiest way to use MacGzip is as a Drag & Drop tool; depending on what you enter in the preferences dialog, the use can be fully automatic or manual.
Note: 'open keys' are the keys you push while dragging a files/folders on MacGzip. You should hold them down until the window (for the first file) appears.
- gzip standard options:
* gzip suffix: This is the '-s' option of standard gzip. Here you can specify an optional suffix to use instead of '.gz'. If you are using the standard suffixes, let it empty. A note: unix gzip accepts any suffix when -s "" is used; in MacGzip empty means "no -s option". Should I change this?
* Compression level: This is the '-[1-9]' option. The higher level, the slower and better compression. Compression level does not affect to decompression.
* Force overwrite: This is the '-f' option. If you set it, MacGzip will overwrite files or empty folders if their names are the same of an output file.
* -N: OK, this is not an option, in MacGzip its always on. (The original name and time stamp will be restored/saved)
* -r: OK, this is not an option, in MacGzip, by now, its always on. (Drop Folders enabled)
Note: there is not interface to control what happends when you drop a folder. MacGzip will try to open all the files (recursing over included folders) using the current settings (keys pushed on drop, preferences, etc). This will change in the future.
- MacGzip options:
* Signatures:
Files compressed with gzip haven't any information about the kind of document of the original file; so to decompress them MacGzip has to guess it. Sometimes this can be done by looking at the suffix; when this fails, it will use these.
You can find more information about this in the 'Suffix Mapping' folder.
* ASCII compress:
This line tells to MacGzip when it has to convert newlines in the compression process. In the pop up menu you have 3 choices:
1) Only for TEXT files: Only files which are recognised as TEXT by the Macintosh will be compressed in ASCII mode. This is a safe setting unless you have binary files whose type is 'TEXT' (for example if you are using Versaterm FTP Server), if this is your case, you should get a file typer to fix your files.
2) Never: All files will be compressed in binary mode. This is the safest setting; if you aren't moving your compressed text files to a different operating system you'll never have problems with this.
3) Use 'gzip' menu: This is more flexible, especially if you are using the 'open' menu instead of the Drag & Drop mode; but also more dangerous.
4) Use Internet Config settings: If the best matching of your 'File Types' settings of Internet Config is marked as ASCII and not marked 'not for outgoing' ASCII mode will be used; if no matches are found, Binary mode will be used
You have an additional option: 'use open key'. If you check it, you can force ASCII compression by holding 'opt-a' keys while dropping the files on MacGzip icon, overriding other settings.
* ASCII uncompress:
This line tells to MacGzip when it has to convert newlines in the decompression process. In the pop up menu you have 3 choices:
1) Use Fetch Prefs: MacGzip will look in Fetch preferences for the suffix of the decompressed name. If the suffix is found, the mode will be read from Fetch Prefs; otherwise binary mode will be used. Additionally, if the suffix is found, the creator and type of the expanded file will be correct, too.
2) Never: All files will be decompressed in binary mode. This is the safest setting; if you aren't moving your compressed text files to a different operating system you'll never have problems with this, and if you are getting compressed text files from the outside, you always can use a newline converter utility.
3) Use 'gzip' menu: This is more flexible, especially if you are using the 'open' menu instead of the Drag & Drop mode; but also more dangerous.
4) Use Internet Config settings: If the suffix matching of your 'File Types' settings of Internet Config is marked as ASCII and not marked 'not for incoming' ASCII mode will be used. Note that the default setting for IC are 'Macintosh' for many types which could be pure ASCII. You should verify all the settings after installing IC and before using any IC aware application.
You have an additional option: 'use open key'. If you check it, you can force ASCII decompression by holding '-a' key while dropping the files on MacGzip icon, overriding other settings.
-Remember: A binary file transmitted or compressed in ASCII mode is lost!
* Compress:
This line tells to MacGzip when it has to compress or expand files:
1) All non MacGzip Files: MacGzip will try to uncompress all files whose type does not match gzip, compress or zip; so if you have a compressed file without the correct type, MacGzip will try to compress it (you should get a better file transfer application...)
To determine if a file is compressed, MacGzip first check its type; if this does not match 'Gzip', 'ZIVU' or 'pZIP', the suffix is tested against ".gz", ".z", ".Z", ".taz", ".tgz", "-gz", "-z" and "_z".
2) Use 'gzip' menu: This is more flexible, especially if you are using the 'open' menu instead of the Drag & Drop mode.
You have an additional option: 'use open key'. If you check it, you can force compression by holding 'opt' key while dropping the files on MacGzip icon, overriding other settings.
-Note: open keys should be hold down until the window appears.
• Using Macgzip
Select your files/folders and drop them on MacGzip icon.
The 'cancel' button (or cmd-period) raises a SIGINT and the program terminates (leaving the input file untouched and erasing the partial output file).
• About types & creators
I have used the following file Types:
suffix type creator
.gz Gzip Gzip gziped
.Z ZIVU Gzip compressed (from maccompress)
.z pZIP Gzip pkziped (from UnZip 2.0.1)
Anyway, read GNU’s gzip.doc to find out about formats.
When you download a file from a non-mac host, the program that you are using to download must assign it two flags: File Type and File Creator. These are two four character words that the Mac uses to know what icon they must have, what application must be opened when you make a double click on it, and if one SFGetFile (the 'open' dialog) should show the file or not.
So, you should use a downloading application with a "suffix mapping" menu or preference, or at least, a drag&drop file typer. With this version of MacGzip, you don't need to use the correct type, but is a good idea to keep your files well typed.
If you want MacGzip to set the correct types but you don't use Fetch, you can find a 'Fetch Prefs' file in the 'Suffix Mapping'. You can copy it to your Preferences folder (in your System folder); and if you want to add suffixes, you can edit it with ResEdit or other resource editor (there is a template included).
Or you can use Internet Config, available from
ftp://redback.cs.uwa.edu.au//Others/PeterLewis/
ftp://ftp.nig.ac.jp/pub/mac/PeterLewis/
ftp://nic.switch.ch/software/mac/peterlewis/
ftp://amug.org/pub/peterlewis/
ftp://ftp.share.com/peterlewis/
ftp://cadadmin.cadlab.vt.edu/peterlewis/
ftp://ftp.acns.nwu.edu/pub/newswatcher/helpers/
ftp://ftp.tidbits.com/pub/tidbits/
• Warranty & so
The guarantee is directly proportional to the price of the application: NONE. (OK, if you loose a very important file with 2.3 Mb of data, let me know it and I will send you a few words of condolence).
• Thanks to:
Jean-loup Gailly <jloup@chorus.fr> for gzip
Erling Johansen <ejo@vingmed.no> for the port to PPC (a nice job!) and Posix lib
Timothy Murphy <tim@maths.tcd.ie> for Posix lib used in the first versions.
Quinn "The Eskimo" <quinn@cs.uwa.edu.au> and
Peter N Lewis <peter.lewis@info.curtin.edu.au> for Internet Config Prog. Kit
tree@uvm.edu for SpinCursors code
Greg Robbins for Prefs code
C.K. Haun (Apple DTS) for Movable Modal code
Bryan Stearns (Apple DTS) for Pop Up Menus code
Dave Rubinic for Easy Errors 1.0 resources
Lloyd Chambers (MacCompress) for Icons idea
David "ELEE74L" Alten <"elee74l@menudo.uh.edu"> for icons improvement
And all other people whose source code I used ‘for documentation’